import java.util.Scanner;

public class 评委评分 {
    public static void main(String[] args) {
        int[] arr = new int[6];
        Scanner sc = new Scanner(System.in);

        for (int i = 0; i < arr.length; i++) {
            System.out.println("请输入第" + (i + 1) + "位评委的分数");
            arr[i] = sc.nextInt();
            if (arr[i] > 100 || arr[i] < 0) {
                System.out.println("输入错误请重输");
                i = i - 1;
            }
        }

        int temp;
        for (int i = 0; i < arr.length-1; i++) {
            for (int j = 0; j < arr.length-1-i; j++) {
                if(arr[j]>arr[j+1]){
                    temp = arr[j];
                    arr[j]= arr[j+1];
                    arr[j+1]= temp;

                }
            }
        }

                int score = (arr[1] + arr[2] + arr[3] + arr[4]) / 4;
                System.out.println("最总得分为：" + score);
            }
        }


